const Demands = () => import(/* webpackChunkName: "Demands" */ "@/views/trade/demand/list")
const Demand = () => import(/* webpackChunkName: "Demands" */ "@/views/trade/demand/detail")
const DemandsBoardInfo = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/info")
const DemandsBoardSeason = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/season")
const DemandsBoardFishes = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/fishes")
const DemandsBoardAddress = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/address")
const DemandsBoardProvinces = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/addresses/provinces")
const DemandsBoardCitys = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/addresses/citys")
const DemandsBoardAreas = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/addresses/areas")
const DemandsBoardTowns = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/addresses/towns")
const DemandsBoardNomore = () => import(/* webpackChunkName: "DemandsBoard" */ "@/views/trade/demand/post/addresses/nomore")

export default [
  {
    path: "/trade/demands", //求购列表
    name: "demands",
    component: Demands
  },
  {
    path: "/trade/demand/:id", //求购详情
    name: "demand",
    component: Demand
  },
  {
    path: "/trade/demands/post/fishes", //供应发布
    name: "demandsBoardFishes",
    component: DemandsBoardFishes,
    meta: { requiresAuth: 'toLoginPage' },
  },
  {
    path: "/trade/demands/post/info",
    name: "demandsBoardInfo",
    component: DemandsBoardInfo,
    meta: { requiresAuth: true, requiresFishDemand: true }
  },
  {
    path: "/trade/demands/post/season",
    name: "demandsBoardSeason",
    component: DemandsBoardSeason,
    meta: { requiresAuth: true, requiresFishDemand: true }
  },
  {
    path: "/trade/demands/post/address",
    name: "demandsBoardAddress",
    component: DemandsBoardAddress,
    meta: { requiresAuth: true, requiresFishDemand: true },
    children: [
      {
        path: "provinces",
        name: "demandsBoardProvinces",
        component: DemandsBoardProvinces,
        meta: { requiresAuth: true, requiresFishDemand: true }
      },
      {
        path: "citys",
        name: "DemandsBoardCitys",
        component: DemandsBoardCitys,
        meta: { requiresAuth: true, requiresFishDemand: true }
      },
      {
        path: "areas",
        name: "demandsBoardAreas",
        component: DemandsBoardAreas,
        meta: { requiresAuth: true, requiresFishDemand: true }
      },
      {
        path: "towns",
        name: "demandsBoardTowns",
        component: DemandsBoardTowns,
        meta: { requiresAuth: true, requiresFishDemand: true }
      },
      {
        path: "nomore",
        name: "demandsBoardNomore",
        component: DemandsBoardNomore,
        meta: { requiresAuth: true, requiresFishDemand: true }
      },
    ]
  },
  {
    path: "/trade/demands/post/:id/edit", //供应
    name: "demandsEditBoard",
    component: DemandsBoardInfo,
    meta: { requiresAuth: true },
  },
]
